# coding: UTF-8
# @Date    ：2024/10/25 10:48 
# @File    : __init__.py
# :Author:  fum
import os
import sys

# 设置huggingface的镜像地址
os.environ["HF_ENDPOINT"] = "https://hf-mirror.com"

# 模型下载目录
os.environ['SENTENCE_TRANSFORMERS_HOME'] = '../../../../data/hugging_face_model'

from sentence_transformers import SentenceTransformer

sentences_1 = ["样例数据-1", "样例数据-2"]
sentences_2 = ["样例数据-3", "样例数据-4"]
model = SentenceTransformer('BAAI/bge-large-zh-v1.5')
embeddings_1 = model.encode(sentences_1, normalize_embeddings=True)
embeddings_2 = model.encode(sentences_2, normalize_embeddings=True)
print(embeddings_1)
print(embeddings_2)

if __name__ == '__main__':
    pass
